//
//  LKPickerViewController.h
//  LKPickerViewDemo
//
//  Created by LIUKUN-PC on 16/6/14.
//  Copyright © 2016年 liukun. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef  NS_ENUM(NSInteger, LKPickerType) {
    LKPickerTypeDate,   //日期选择
    LKPickerTypeCustom  //普通选择
};

@interface LKPickerViewController : UIViewController

/**
 *  创建日期选择控制器
 *
 *  @param selectedDate 当前选择的日期
 *  @param completion   完成回调，selectedDate为完成时选择的日期
 *
 *  @return 实例对象
 */
+ (instancetype)datePickerVCWithSelectedDate:(NSDate *)selectedDate completion:(void(^)(NSDate *selectedDate))completion;
/**
 *  创建普通选择控制器
 *
 *  @param dataArray     数据
 *  @param selectedIndex 当前选择的索引
 *  @param completion    完成回调，selectedIndex
 *
 *  @return 实例对象
 */
+ (instancetype)customPickerVCWithDataSource:(NSArray<NSString *> *)dataArray selectedIndex:(NSInteger)selectedIndex completion:(void(^)(NSInteger selectedIndex))completion;

/** 选择类型 */
@property (nonatomic, assign, readonly) LKPickerType pickerType;

/** 显示过程中的回调，有动画 */
@property (nonatomic, copy) void(^showBlock)();
/** 消失过程中的回调， 有动画,  didSelect是否选中了某一项 */
@property (nonatomic, copy) void(^dismissBlock)(BOOL didSelect);

/*************************** 可自定义视图属性 ***************************/

/** 日期选择控件 */
@property (nonatomic, strong, readonly) UIDatePicker *datePicker;

/** 选择控件 */
@property (nonatomic, strong, readonly) UIPickerView *pickerView;

/** 完成按钮 */
@property (nonatomic, strong, readonly) UIButton *doneButton;

/** 取消按钮 */
@property (nonatomic, strong, readonly) UIButton *cancelButton;

/** 当前值标签 */
@property (nonatomic, strong, readonly) UILabel *currentValueLabel;


/** 文字大小，默认为17 */
@property (nonatomic, assign) CGFloat pickerViewFontSize;

/** 行高，默认为44 */
@property (nonatomic, assign) CGFloat pickerViewRowHeight;

@end
